<template>
    <div>
         <el-tabs v-model="activeName"> 
            <el-tab-pane label="运费模板" name="second">
                <div>
                 <el-button type="primary" size="mini">添加模板</el-button>
                </div>
                <el-table
                :data="tableData"
                style="width: 100%; margin-top: 20px; margin-bottom: 60px"
                border
                ref="multipleTable"
                >
                <el-table-column prop="name" label="模板名称" align="center" width="180">
                </el-table-column>
                <el-table-column label="计费方式" align="center" width="280">
                    <template v-slot='scope'>
                        {{scope.row.type | formatType}}
                    </template>
                </el-table-column>
                <el-table-column label="排序" align="center" width="180" prop="order"></el-table-column>
                <el-table-column label="状态" align="center" width="180">
                    <template v-slot="scope">
                    <el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0"></el-switch>
                    </template>
                </el-table-column>
                <el-table-column label="添加时间" align="center" width="180" prop="create_time"></el-table-column>
                <el-table-column label="操作" align="center">
                    <template>
                    <el-button type="text" size="medium">修改</el-button>
                    <el-button type="text" size="medium">删除</el-button>
                    </template>
                </el-table-column>
                </el-table>
            </el-tab-pane>
            <el-tab-pane label="物流跟踪" name="third">
                <el-form ref="form" :model="form" label-width="130px">
                    <el-form-item label="快递100">
                        <el-input v-model="form.customer" placeholder="快递100" size="mini" style="width:25%"></el-input>
                        <small class="text-secondary d-block">用于查询物流信息<a href="#">快递100申请</a></small>
                    </el-form-item>
                    <el-form-item label="秘钥">
                        <el-input v-model="form.key" placeholder="秘钥" size="mini" style="width:25%"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" size="mini">保存</el-button>
                    </el-form-item>
                </el-form>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
export default {
   data() {
      return {
          activeName: 'second',
          form:{
              customer:"",
              key:''
          },
          tableData: [
            {
                name:'全国统一邮费',
                type:1,
                create_time:'2022-01-01 18:00:00',
                status:1,
                order:100
            }
        ],
      }
   },
   filters:{
       formatType(e) {
           let arr = ['按件数', '按重量']
           return arr[e]
       }
   },
   components: {
   },
   props: {
   },
   created(){
   },
   computed:{
   },
   watch:{
   },
   methods:{
   },
}
</script>
<style lang="less" scoped>

</style>
